<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			.box{
				width: 200px;
				height: 10px;
				border: solid 1px black;
				border-radius: 10px;
				background: #ccc;
			}
			#box2{
				width: 0%;
				height: 10px;
				border-radius: 10px;
				background: red;
			}
		</style>
		<script src="js/jquery-3.7.0.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				var w = 0;
				var timer = setInterval(function(){
					w++;
					$("#box2").css("width",w+"%");
					$("#pp").html(w+"%");
					if(w==100){
						clearInterval(timer);
					}
				},50)
			})
		</script>
	</head>
	<body>
		<h1>进度条</h1>
		<div class="box">
			<div id="box2"></div>
			<p id="pp">0%</p>
		</div>
	</body>
</html>
